home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr26 / dsx22.zip / QUICKREF.DOC < prev    next >
Text File  |  1992-09-20  |  14KB  |  608 lines

  1.  
  2.  
  3.  
  4.  
  5.             
  6.                DOSNIX QUICK REFERENCE GUIDE
  7.             Copyr. 1991,1992 by G. Vrooman
  8.                All rights reserved.
  9.                     
  10.  
  11.      
  12.  
  13.      GETTING STARTED:
  14.  
  15.       If you have a hard drive, make a directory named C:\DOSNIX
  16.     and copy the DOSNIX files into it.  To use DOSNIX from any
  17.     directory, you need the following statement in your AUTOEXEC.BAT
  18.     file:
  19.  
  20.            PATH = C:;C:\DOSNIX
  21.  
  22.       If you already have a path statement, add ;C:\DOSNIX to the
  23.     end of it.  If you don't have an AUTOEXEC.BAT file, you can
  24.     make one with any handy text editor.  The following line will
  25.     help you keep track of where you are on your hard drive:
  26.  
  27.         PROMPT $P$G
  28.  
  29.     This will make your current directory part of your prompt.
  30.  
  31.  
  32.       If you don't have a hard drive, you can make a bootable floppy 
  33.     disk with COMMAND.COM, FORMAT.COM, PRINT.COM and any other MSDOS 
  34.     utilities you need.  Copy as many DOSNIX utilities as you can to 
  35.     it and use it as a working disk.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.     DOSNIX OPTIONS:
  43.  
  44.       Most DOSNIX commands have a simple format which can be enhanced 
  45.     by the use of UNIX style option strings.  The option string is always 
  46.     the first argument after the command and usually begins with a "-".  
  47.     See DOSNIX.DOC for the options available with each command.
  48.  
  49.       If you are used to MSDOS switches and find this awkward you can 
  50.     insert the following line in your AUTOEXEC.BAT file:
  51.  
  52.             SET SWITCH=/     (No space before or after "=")
  53.  
  54.     All commands except CHMOD and READ will recognize a "/" as an option 
  55.     delimiter.  If you don't use this feature, you can use slashes in 
  56.     path names, as in UNIX, and they will be converted to back slashes.
  57.  
  58.  
  59.     INSTANT HELP:
  60.  
  61.       DOSNIX.DOC has now been keyed for quick command searches and
  62.     a HELP.BAT file has been included.  To obtain on-line help, type 
  63.     "help" and the name of the subject with which you want help.  In
  64.     addition, a brief summary of most commands can be obtained by typing 
  65.     the name of the command followed by a "-?". 
  66.  
  67.  
  68.     
  69.     NOTE:
  70.  
  71.     UNIX is a registered trademark of AT&T corporation
  72.         MSDOS is a registered trademark of Microsoft corporation
  73.  
  74.  
  75.     
  76.  
  77.  
  78.  
  79.                         LIST OF DOSNIX COMMANDS
  80. -------------------------------------------------------------------------------
  81.  
  82.  
  83.         APP             append standard input to file(s).
  84.  
  85.         CAT             Copy text file(s) to standard output.
  86.  
  87.         CHMOD           Modify attribute(s) of file.
  88.  
  89.         CLR             Set screen foreground, background and border colors.
  90.  
  91.         CP              Copy file to new file or directory.
  92.  
  93.         CPDIR           Copy directory and all subdirectories. *
  94.  
  95.         DB              Delete all files except specified files.
  96.  
  97.     EDC        Easy Directory Change.
  98.  
  99.         FFIND           Find all copies of file in specified path.
  100.  
  101.         GET             Find all filenames containing specified string. *
  102.  
  103.         LS              List contents of directory.
  104.  
  105.         MV              Move file to new file or directory.
  106.  
  107.         MVDIR           Move directory and all subdirectories to new location.
  108.  
  109.         READ            Display text file in page format.
  110.  
  111.         RM              Remove file(s).
  112.  
  113.         RN              Rename file or directory.
  114.  
  115.     SGREP        Search files(s) for text. *
  116.  
  117.     SPLIT        Split a text file into smaller pieces. *
  118.  
  119.         TEE             Copy standard input to standard output and file(s).
  120.  
  121.         TOLOWER         Convert standard input to lower case.
  122.  
  123.         TOUCH           Modify file time and date.
  124.  
  125.         TOUPPER         Convert standard input to upper case.
  126.  
  127.  
  128.  
  129.         * Enhanced version only.
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.     CHANGING SCREEN COLORS:            (ver. 0.93+)
  137.  
  138.  
  139.     clr gre                    Changes screen color
  140.                         to green with black
  141.                         background and border.
  142.  
  143.     clr -b gre                Changes screen color to
  144.                         high intensity green with
  145.                         black background and border.
  146.  
  147.     clr blu whi                Changes screen color to
  148.                         blue with white background
  149.                         and border.
  150.  
  151.     clr -b whi blu whi            Changes screen color to
  152.                         high intensity white with 
  153.                         blue background    and white 
  154.                         border.
  155.  
  156.     clr bla whi                Changes screen color to
  157.                         black on white. (reverse
  158.                         video)
  159.  
  160.     clr                    Clears screen without
  161.                         resetting color attributes.
  162.  
  163.  
  164.  
  165.         Other colors:    red, cya, mag, yel, amb
  166.  
  167.  
  168.  
  169.     Hint:  Try "clr yel amb".  This combination is pleasing and won't
  170.            singe your eyeballs like some combinations.  
  171.  
  172.  
  173.     ANSI.SYS:
  174.  
  175.       ANSI.SYS is the MSDOS graphics device driver.  With ANSI.SYS, you  
  176.     can use CLS to clear the screen without losing your colors.  It is
  177.     also required with many communications programs to view ANSI graphics  
  178.     on bulletin boards.  To install ANSI.SYS, copy it to the root directory 
  179.     of your boot drive and add the following line to CONFIG.SYS:
  180.  
  181.             device = ansi.sys
  182.  
  183.  
  184.         
  185.  
  186.  
  187.  
  188.  
  189.  
  190.     LISTING FILES:
  191.  
  192.  
  193.     ls                    Lists all files in
  194.                         current directory in
  195.                         five column format.
  196.  
  197.     ls -l                    Lists all files in
  198.                         long format like 
  199.                         DOS DIR command.
  200.  
  201.     ls -lt                    Lists all files in
  202.                         long format, sorted
  203.                         by date, oldest files
  204.                         first.
  205.  
  206.     ls -lrt                    Lists all files in
  207.                         long format, most
  208.                         recent files first.
  209.  
  210.  
  211.     ls -le                    Lists all files in 
  212.                         long format, sorted
  213.                         by extension.
  214.  
  215.     ls \                    Lists all files in
  216.                         root directory.
  217.  
  218.     ls c:\cshow                lists all files in
  219.                         C:\CSHOW
  220.  
  221.     ls . \ c:\dosnix            Lists all files in current
  222.                         directory, root directory
  223.                         and C:\DOSNIX
  224.  
  225.     ls *.txt                Lists all files in current
  226.                         directory with an extension
  227.                         of .TXT
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.     LOCATING FILES:
  236.  
  237.  
  238.     ffind calvin.gif            Searches current drive for
  239.                         all copies of CALVIN.GIF.
  240.  
  241.     ffind c: calvin.gif            Searches drive C: for all
  242.                         copies of CALVIN.GIF.
  243.  
  244.     ffind *: wyeth.gif            Searches all hard drives for
  245.                         all copies of WYETH.GIF.
  246.     
  247.     ffind -f *: wyeth.gif            Searches all available drives
  248.                         for all copies of WYETH.GIF.
  249.  
  250.     ffind -r *.bak                Locates and removes all
  251.                         files with an extension
  252.                         of .BAK on current drive.
  253.  
  254.     ffind -i *: *.bak            Searches all drives for
  255.                         .BAK files and allows you
  256.                         choose which ones to delete.
  257.  
  258.     ffind -l list.txt            Locates all copies of LIST.TXT
  259.                         and displays attribute, size,
  260.                         date and time.
  261.  
  262.     ffind -m c: *.*                Finds all files on drive C:
  263.                         and displays totals for each
  264.                         subdirectory.
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.     CHANGING DIRECTORIES:
  272.  
  273.     cd \pcplus\downlds\utils        Changes directory to
  274.     edc util                \PCPLUS\DOWNLDS\UTILS
  275.  
  276.     cd d:\downlds\graphics\gif        Changes directory to
  277.     edc d:gif                D:\DOWNLDS\GRAPHICS\GIF
  278.  
  279.     edc -s                    Scans current drive and
  280.                         stores PATH.EDC in root
  281.                         directory. 
  282.  
  283.     edc -s d:gif                Scans drive D, stores copy
  284.                         of PATH.EDC in D:\ and
  285.                         changes directory to
  286.                         D:\DOWNLDS\GRAPHICS\GIF
  287.  
  288.         edc -t                    Displays directory tree
  289.                         while scanning.
  290.  
  291.     edc -l                      Displays a list of directories.
  292.  
  293.  
  294.  
  295.  
  296.  
  297.     COPYING FILES:
  298.  
  299.  
  300.     cp dosnix.doc dosnix.bak        Copies DOSNIX.DOC to
  301.                         DOSNIX.BAK.
  302.  
  303.     cp dosnix.doc \tempdir            Copies DOSNIX.DOC to
  304.                         \TEMPDIR.
  305.  
  306.     cp *.* \tempdir                Copies all files in
  307.     cp . \tempdir                current directory to
  308.                         \TEMPDIR.
  309.  
  310.     cp oldir newdir                Copies all files in
  311.                         OLDIR to NEWDIR.
  312.  
  313.     cp -i tempdir a:\            Lists all files in
  314.                         TEMPDIR and allows
  315.                         you to choose which
  316.                         ones to copy to A:\
  317.  
  318.     cp -m ted.asm \assmblr a:\source    Copies TED.ASM to \ASSMBLR
  319.                         and A:\SOURCE.
  320.  
  321.     cp -bco c:\text a:\            Copies only archive files in 
  322.                         C:\TEXT, clears archive bit
  323.                         and overwrites any previously
  324.                         existing files in A:\ .
  325.  
  326.                         
  327.  
  328.     MOVING FILES:
  329.  
  330.  
  331.     mv dosnix.bak dosnix.doc        Moves DOSNIX.BAK to
  332.     rn dosnix.bak dosnix.doc        DOSNIX.DOC.
  333.  
  334.     mv dosnix.doc \DOC            If \DOC is an existing
  335.     rn dosnix.doc \DOC            directory, moves DOSNIX.DOC
  336.                         to \DOC\DOSNIX.DOC, otherwise
  337.                         moves DOSNIX.DOC to a file
  338.                         named \DOC . 
  339.  
  340.     mv *.* \tempdir                moves all files in current
  341.     mv . \tempdir                directory to \TEMPDIR.
  342.  
  343.     mv oldir newdir                Moves all files in OLDIR 
  344.                         to NEWDIR.
  345.  
  346.     mv -i tempdir a:\            Lists all files in
  347.                         TEMPDIR and allows
  348.                         you to choose which
  349.                         ones to move to A:\
  350.  
  351.                         
  352.  
  353.  
  354.     MOVING DIRECTORIES:
  355.  
  356.  
  357.     mvdir oldir newdir            Renames OLDIR to NEWDIR.
  358.     rn oldir newdir
  359.  
  360.     mvdir \text \vde\text            Moves \TEXT to \VDE\TEXT
  361.  
  362.     mvdir c:\stuff a:\stuff            Moves C:\STUFF to A:\STUFF.
  363.                         If a disk full error occurs
  364.                         leaves C:\STUFF intact.
  365.  
  366.     mvdir c:\basic c:\basic\source          Generates error message.
  367.  
  368.  
  369.  
  370.  
  371.     REMOVING FILES:
  372.  
  373.  
  374.     rm dosnix.bak                Removes DOSNIX.BAK
  375.  
  376.     rm *.bak                Removes all .BAK files
  377.                         in current directory.
  378.  
  379.     rm -i *.*                Displays all files in
  380.                         current directory and
  381.                         allows you to choose
  382.                         which ones to delete.
  383.  
  384.     rm tempdir\*.*                Removes all files in
  385.                         TEMPDIR but leaves
  386.                         directory.
  387.  
  388.     rm -r tempdir                Removes TEMPDIR along
  389.                         with all files and sub-
  390.                         directories.
  391.  
  392.     rm -r a:\                Removes all files and
  393.                         directories on drive A:
  394.  
  395.     db dosnix94.zip                Deletes all files in
  396.                         current directory except
  397.                         DOSNIX94.ZIP.
  398.  
  399.     db *.c *.exe                Deletes all files except
  400.                         .C and .EXE files.
  401.  
  402.  
  403.  
  404.  
  405.  
  406.     MODIFYING FILE ATTRIBUTES AND TIMES:
  407.  
  408.  
  409.     touch dosnix.doc            Changes time and date of
  410.                         DOSNIX.DOC to current DOS
  411.                         time and date.
  412.  
  413.     touch *.*                Changes time and date of
  414.                         all files in directory to
  415.                         current DOS time and date.
  416.  
  417.     touch -t ted.com            TOUCH will prompt you
  418.                         for a time and date 
  419.                         before modifying TED.COM.
  420.  
  421.     touch -t 07/04/91;16:30:00 test.txt     Changes time and date of
  422.                         TEST.TXT to 4:30 PM, July 4, 
  423.                         1991.
  424.  
  425.     chmod -a *.*                Removes those pesky archive
  426.                         bits from all files in the
  427.                         current directory.
  428.  
  429.     chmod +a records.txt            Restores the archive bit to
  430.                         RECORDS.TXT, to remind you
  431.                         that you haven't backed it up.    
  432.  
  433.     chmod +r homework.txt            Makes HOMEWORK.TXT a read
  434.                         only file so your kid brother
  435.                         won't erase it by mistake.
  436.  
  437.     chmod +h vanna.gif            Hides VANNA.GIF so your wife
  438.                         or boss won't see it.
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.                 USING CAT, APP and TEE
  446.  
  447.  
  448.     cat > test.txt                Copies whatever is typed
  449.                         on the keyboard to TEST.TXT.
  450.                         Use CTRL-Z to quit.
  451.  
  452.     cat whats.new dosnix.doc        Writes WHATS.NEW and 
  453.                         DOSNIX.DOC to screen.
  454.  
  455.     cat whats.new dosnix.doc > docs.txt     Concatenates WHATS.NEW
  456.                         and DOSNIX.DOC and stores
  457.                         them in DOCS.TXT.
  458.  
  459.     cat *.c > csource.txt            Concatenates all files with
  460.                         an extension of .C and
  461.                         stores them in CSOURCE.TXT.
  462.  
  463.     cat newutil.c | app csource.txt        Appends NEWUTIL.C to
  464.     app < newutil.c csource.txt        CSOURCE.TXT.
  465.  
  466.     app < newutil.c > csource.txt        Totally destroys CSOURCE.TXT.
  467.  
  468.     cat newutil.c >> csource.txt        Appends NEWUTIL.C to
  469.                         CSOURCE.TXT but leaves
  470.                         a CTRL-Z between the two 
  471.                         files.
  472.  
  473.     cat *.c | tee csource.txt        Concatenates all files with
  474.                         an extension of .C and stores
  475.                         them in CSOURCE.TXT while
  476.                         writing them to the screen.
  477.  
  478.     cat *.c | tee csource.txt | read    Same as above except pipes
  479.                         screen output to READ.
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.             USING READ        (ver. 0.94f+)
  489.  
  490.  
  491.     read                    Reads from STDIN. Not
  492.                         very useful by itself.
  493.                         If you get stuck in this
  494.                         mode type CTRL-Z to get
  495.                         out.
  496.  
  497.     read dosnix.doc                Displays contents of
  498.                         DOSNIX.DOC.
  499.  
  500.     read whats.new dosnix.doc        Displays contents of
  501.                         WHATS.NEW and DOSNIX.DOC.
  502.  
  503.     read *.doc                Displays contents of all
  504.                         files with an extension
  505.                         of .DOC .
  506.  
  507.  
  508.  
  509.     KEYPAD COMMANDS:
  510.  
  511.  
  512.         PgDn                          Clears screen and displays
  513.                         next page.
  514.  
  515.     PgUp                    Clears screen and displays
  516.                         previous page.
  517.  
  518.  
  519.         Down Arrow                Displays next line.
  520.  
  521.     Up Arrow                Moves back one line.
  522.  
  523.     Right Arrow                Shifts screen one tab stop 
  524.                         right.
  525.  
  526.     Left Arrow                Shifts screen one tab stop left.
  527.  
  528.         Home, ^PgUp                       Moves to beginning of file.
  529.  
  530.         End, ^PgDn                   Moves to end of file.
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.     UNIX COMMANDS:
  540.  
  541.  
  542.         <space>                     Scrolls until spacebar is 
  543.                         pressed again. (Not quite
  544.                         UNIX).
  545.                         
  546.         ^D, D                       Displays next half page of text.
  547.  
  548.         Enter                         Displays next line of text.
  549.  
  550.         ^U, U                               Moves back one half page.
  551.  
  552.     ^B, B                      Clears screen and displays 
  553.                         previous page.
  554.  
  555.         H                           Displays help page.
  556.  
  557.         ^L, .                         Rewrites current page.
  558.  
  559.         $                        Moves to end of file.
  560.  
  561.         N                           Moves to next file.
  562.  
  563.         Q                           Terminates the program.
  564.     
  565.  
  566.     NOTE: ^ stands for Ctrl key.
  567.  
  568.  
  569.  
  570.  
  571.     NUMERIC AND SEARCH COMMANDS:
  572.  
  573.  
  574.  
  575.     -100                        Moves back 100 lines.
  576.  
  577.         +100                        Moves forward 100 lines.
  578.  
  579.         100                         Moves to line number 100.
  580.  
  581.  
  582.     \CHMOD                    Searches text for first
  583.                         occurrence of "CHMOD".
  584.  
  585.     /                    Searches text for next 
  586.                         occurrence of "CHMOD". 
  587.  
  588.  
  589.     ALTERNATE KEYS:
  590.  
  591.     F1, Backspace                           H, Display help screen.
  592.  
  593.     F10, Del                Escape
  594.  
  595.     [                    ^U, Move back one half page.
  596.  
  597.     ]                    ^D, Move down one half page.
  598.  
  599.     
  600.     
  601.  
  602.     NOTE: READ will maintain whatever color attribute is present when you run
  603.           it.  This means you can set your screen colors with CLR and then
  604.       use READ to view text files in whatever color you like.  READ will
  605.       determine appropriate highlight and menu bar colors.
  606.  
  607.  
  608.